up previous next
NewLine [OBSOLESCENT]

[OBSOLESCENT] string containing a newline

Syntax
NewLine(): STRING

Description
This function is OBSOLESCENT and exists only for backward compatibility with old CoCoA code. It returns a string containing just a newline; in CoCoA-5 it is simpler to write \n .

Example
/**/  str1 := "Line 1" + NewLine() + "Line 2"; --> old CoCoA-4 way
/**/  str2 := "Line 1\nLine 2";                --> more compact in CoCoA-5
/**/  str1 = str2;
True
/**/ Print str2;
Line 1
Line2

See Also